package com.hqyj.goods.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hqyj.goods.dto.InventoryInfo;
import com.hqyj.goods.entity.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hqyj.goods.entity.Inventory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sdx2009
 * @since 2022-09-30
 */
public interface GoodsMapper extends BaseMapper<Goods> {

    Page<Inventory> inventoryOperation(Page page,InventoryInfo inventoryInfo);

    int joinStorage(@Param("goodsId") Integer goodsId,@Param("storageId") Integer storageId);

    Inventory selectStorage(Integer goodsId);

    int outStorage(Integer goodsId);

    int updateStorage(@Param("goodsId") Integer goodsId,@Param("storageId") Integer storageId);

    int updateGoodsNums(@Param("goodsId") Integer goodsId,@Param("goodsNums") Integer goodsNums);



}
